package com.project.UI.news;

import java.util.ArrayList;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.view.ViewGroup;

public class NewsViewPagerAdapter extends FragmentPagerAdapter {
	private ArrayList<Fragment> fragmentArray;

	public NewsViewPagerAdapter(FragmentManager fm, ArrayList<Fragment> fragmentArray) {
		super(fm);
		fragmentArray = new ArrayList<Fragment>(fragmentArray);
	}

	@Override
	public Fragment getItem(int position) {
		return fragmentArray.get(position);
	}

	@Override
	public int getCount() {
		return fragmentArray.size();
	}

	@Override
	public long getItemId(int position) {
		return super.getItemId(position);
	}

	@Override
	public Object instantiateItem(ViewGroup container, int position) {
		return super.instantiateItem(container, position);
	}

}
